//
//  CollectionViewCell.m
//  婚礼纪-流式布局
//
//  Created by dllo on 15/5/13.
//  Copyright (c) 2015年 lanou3g.com蓝鸥科技. All rights reserved.
//

#import "CollectionViewCell.h"
#import "Myimageview.h"
#import "UIImageView+WebCache.h"
#import "newSongModel.h"
#import "SingerModel.h"

@implementation CollectionViewCell
- (void)dealloc

{
    [_imageview release];
    [_labelOne release];
    [super dealloc];
}

-(instancetype)initWithFrame:(CGRect)frame

{
    
    self =[super initWithFrame:frame];
    
    if (self) {
        
        [self createImageview];
        
    }
    return self;

}

-(void)createImageview
{
    
    self.imageview =[[UIImageView alloc]initWithFrame:CGRectMake(0, 0,[UIScreen mainScreen].bounds.size.width/2-20, [UIScreen mainScreen].bounds.size.width/2-20)];
    _imageview.userInteractionEnabled =YES;
    
    [_imageview.layer setCornerRadius:[UIScreen mainScreen].bounds.size.width / 2.25 / 2];
    
    [_imageview.layer setMasksToBounds:YES];
    
    [self.contentView addSubview:self.imageview];
    
    self.labelOne =[[UILabel alloc]initWithFrame:CGRectMake(0 ,[UIScreen mainScreen].bounds.size.width/2-20,[UIScreen mainScreen].bounds.size.width/2-20,[UIScreen mainScreen].bounds.size.width/8)];
    self.labelOne.font =[UIFont systemFontOfSize:15];
    self.labelOne.numberOfLines =10;
    [self.contentView addSubview:self.labelOne];
}
-(void)setnewSongModel:(SingerModel *)model
{
    [self.imageview sd_setImageWithURL:[NSURL URLWithString:model.pic_url] placeholderImage:nil];
    
    self.labelOne.text =model.title;
   
}


@end
